import { requestHandler } from '@/utils/rquest';
import { IPages } from '@/interface/pages';
import { INotISpecual, ISpecual, ISpecualList } from '@/interface/ISpecual';
const prefix = "/specual";


/**
 * 热门文章
 */
export const notspecualApi = () => requestHandler<INotISpecual[]>("GET", prefix + "/not");

/**
 * 文章分页
 * @param type 类型
 * @param current 第几页 
 * @param size 一次搜索几条
 * @returns 
 */
export const specualPagesApi = (type: string, current: number = 1, size: number = 10) => requestHandler<IPages<ISpecualList[]>>("GET", prefix + `/${type}/page/${current}/${size}`);


/**
 * 文章详情
 */
export const specualDetailsApi = (id: string) => requestHandler<ISpecual>("GET", prefix + `/${id}/details/`);
